package observer;

import javax.swing.JLabel;

public class ScoreDisplay implements ScoreObserver {
    private JLabel scoreLabel;

    public ScoreDisplay(JLabel scoreLabel) {
        this.scoreLabel = scoreLabel;
    }

    @Override
    public void updateScore(int score) {
        scoreLabel.setText("得分: " + score);
    }
}